<?php
include 'conn.php';
$sql = "SELECT * FROM students";
$result = mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0)
{
    while($row=mysqli_fetch_assoc($result))
    {
        echo"ID:".$row["id"]." - 姓名：".$row["realname"]." - 学号".$row["unumber"]." - 班级:".
        "网络21-".$row["class"]."班"." - 性别：".($row["gender"]?"男":"女")." - 兴趣："."$row[hobby]"." - 备注："."$row[mark]"." - 注册时间：".
        date("Y-m-d H:m",$row["create_time"])."<br>";

    }
}
else{
    echo"没有记录";
}
$conn->close();
?>